package com.wsc.entity;

import javax.persistence.CascadeType;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.OneToOne;
import javax.persistence.Table;

import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

@Entity
@Table(name = "t_readrooms")
@AllArgsConstructor
@NoArgsConstructor
@Data
public class ReadRoom {
	@Id
	@GeneratedValue(strategy=GenerationType.IDENTITY)
	private Integer id;// 资源编号
	private String name;// 阅览室名称
	private String remark;
	//mappedBy表明不建外键
	//@OneToOne(optional=false,mappedBy="readroom",cascade=CascadeType.ALL,fetch=FetchType.EAGER)
	//@JoinColumn(name="readroom_computer_id",unique=true)//一对一关系 指定副表外键列
	//@JsonIgnoreProperties("readroom")
	//private Computer computer;
	//id name remark computer[id name ip readroomid remark]
	
}
